import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  base:'./',  
  dest: './dist',  
  title: "给木小野人",
  description: "一个官网",
  router: {
    mode: 'hash'  // 'hash' | 'history'
  },
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: 'Home', link: '/' },
      // { text: 'Examples', link: '/markdown-examples' }
    ],
    router: {
      extendRoutes(routes) {
        return [
          // 捕获所有未定义路由
          {
            path: '/:pathMatch(.*)*',
            redirect: '/'
          }
        ]
      },
    sidebar: [
      {
        text: 'Examples',
        items: [
          { text: 'Markdown Examples', link: '/markdown-examples' },
          { text: 'Runtime API Examples', link: '/api-examples' }
        ]
      }
    ],
    footer: {
      message:
      `
      <div style="display: flex; gap: 8px; justify-content: center;">
        <a href="https://beian.miit.gov.cn" target="_blank">冀ICP备2025104226号-1</a>
        <a href="https://beian.mps.gov.cn/#/query/webSearch?code=13010802002450" style="display:block;" rel="noreferrer" target="_blank">
          <img style="width:15px;height:15px;display:inline;" src=""/>
          冀公网安备13010802002450号
        </a>
      </div>
    `
    }
    // socialLinks: [
    //   { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
    // ]
  }
})
